package com.itheima.job;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.OrderSettingService;
import com.itheima.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;

import java.util.Date;

@Slf4j
public class ClearOrderSettingJob {
    @Reference
    OrderSettingService orderSettingService;
    public  void  clearOrderSettingJob(){
        log.debug("开始定时清除orderSetting命令");

        String date = DateUtils.parseDate2String(new Date());

        orderSettingService.clear(date);
        log.debug("完成定时清除orderSetting命令");
    }
}
